www-Sharp COM objects

www-Sharp defines some objects that let use it with scripts and any tools that can work with COM.

wwwSharp.Application

Property/Method Description
Name Returns "www-Sharp", read only
Application Returns application object, read only.
Parent Returns application object, read only.
Path Returns the path specification for the application's executable file; read only.
FullName Returns the file specification for the application, including path; read only.
Left Sets or returns the distance between the left edge of the physical screen and the main application window; read/write.
Top Sets or returns the distance between the top edge of the physical screen and main application window; read/write.
Width Sets or returns the distance between the left and right edges of the main application window; read/write.
Height Sets or returns the distance between the top and bottom edge of the main application window; read/write.
Caption Sets or returns the title of the application window; read/write.
StatusBar Sets or returns the text displayed in the status bar; read/write.
Visible Sets or returns whether the application is visible to the user; read/write.
Help(file: string; context: int; helpString: string) Displays online Help.
Quit() Exits the application and closes all open documents.
CurrentProject Returns www-Sharp project; read only.
Documents Returns a collection object for the open documents; read only.
Objects Scripting.Dictionary that holds user objects. You can store any objects here.
OpenProject(basePath: string; URL: string) Opens project with specified base path and URL.
OpenNamedProject(name: string) Open project with specified name.

wwwSharp.Project:

Property/Method Description
Name Name of the project; read/write.
Application Returns application object, read only.
Parent Returns application object, read only.
Path Returns base path of the project, read-only.
URL Returns URL of the project, read-only.
Objects Scripting.Dictionary that holds user objects. You can store any objects here.

wwwSharp.Documents:

Property/Method Description
Application Returns application object, read only.
Parent Returns the parent of the Documents collection object; read only.
Count Returns the number of items in the collection; read only.
Item[index] Returns a Document object from the collection.
Add(docType: string): object Creates a new document and adds it to the collection. Returns the document that was created.
Open(fileName: string): object Opens an existing document and adds it to the collection. Returns the document that was opened.
SaveAll() Saves all documents in collection.
Close() Closes all documents in the collection.

wwwSharp.Document:

Property/Method Description
Application Returns the Application object; read only.
Parent Returns the Parent property of the Document object; read only.
FullName Returns the file specification of the document, including the path; read only.
Path Returns the path specification for the document, not including the file name or file name extension; read only.
Saved Returns True if the document has never been saved, but has not changed since it was created. Returns True if it has been saved and has not changed since last saved. Returns False if it has never been saved and has changed since it was created; or if it was saved, but has changed since last saved. Read only.
ReadOnly Returns True if theádocument is read only, otherwise False; read only.
Name Returns the file name of the document, not including the file's path specification; read only.
DocType Returns type of the document.
Title Sets or returns summary information about the title of the document; read/write.
Text Returns text property of the document, actual value depends on document type. Read/write.
Objects Scripting.Dictionary associated with document. Here you can store document-related objects.
Open(fileName: string) Opens file in this document.
Save() Saves changes to the file specified in the document's FullName property.
SaveAs(fileName: string) Saves changes to a file.
RevertToSaved() Reverts to the last saved copy of the document, and discards any changes.
Close() Closes all windows associated with the document and removes the document from the Documents collection.
Activate() Activates the window associated with the document.
Print() Prints the document.
PrintOut() Same as Print method, but provides an easier way to use the method in Visual Basic, because Print is a Visual Basic keyword.
PrintPreview() Previews the pages and page breaks of the document.

Depending on DocType document can expose additional properties/methods.

wwwSharp.SynDocument:

Implemented for Syntax editor. DocType is "SynEdit".

Property/Method Description
SynDocument Returns syntax document.

wwwSharp.SyntaxDocument:

Property/Method Description
Text Returns/sets document text.
Lines Returns Lines object.
Highlighter Returns/sets highlighter name.
Bookmark[index: int] Returns Bookmark position (line number, one-based). Index is number from 0 to 9.
SelText Returns/sets selected text.
SelStart Returns start selection position. Returned object has two properties: Line (default) and Column.
SelEnd Returnsáend selection position. Returned object has two properties: Line (default) and Column.
LoadFromFile(fileName: string) Loads text from file.
SaveToFile(fileName: string) Saves text into file.
Cut() Cuts into clipboard.
Copy() Copies into clipboard.
Paste() Paste from clipboard.

wwwSharp.TextEditor:

Implemented for RTF editor. DocType is "RTF".

Property/Method Description
TxtDocument TextDocument object - the same object that is used in Microsoft« Word and Microsoft« Visual Studio.

wwwSharp.HtmlEditor:

Implemented for HTML editor. DocType is "HTML".

Property/Method Description
HtmlDocument Switchs HTML editor into designer view and returns designer's HTML document object.

wwwSharp.XmlEditor:

Implemented for XML editor. DocType is "XML".

Property/Method Description
XmlDocument Switchs editor into designer view and returns XML document object.

wwwSharp.DatabaseEditor:

Implemented for database editor. DocType is "Database";

Property/Method Description
Connection Returns connection object used by database editor.
Recordset Returns recordset object used by database editor.

Other editors/viewers do not expose additional properties and methods. DocTypes are: